import KZJRequest from '../../index'
import { TRequestDefaultResult } from '../../type'

enum SongList {
  CatList = '/playlist/hot', //音乐种类名
  playlist = '/top/playlist' //音乐歌单
}

export function getSongCatlist() {
  return KZJRequest.get<TRequestDefaultResult>({
    url: SongList.CatList
  })
}

export function getSonglist(limit: number, offset: number, cat: string) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: SongList.playlist,
    params: {
      cat,
      limit,
      offset
    },
    showLoading: true
  })
}
